home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-12-09 | 1.2 KB | 67 lines | [TEXT/PJMM] |
- { Common Unit. Contains several routines which are used by several of}
- {the othe units. }
- {Written 7 January 1987 Owen Hartnett, Ωhm Software Co.}
-
- unit common;
-
- interface
-
- uses
- {$IFC UNDEFINED THINK_PASCAL}
- Memtypes, Quickdraw, OSIntf, ToolIntf, PackIntf,
- {$ENDC}
- multiSkelGlobals;
-
-
- procedure DrawGrowBox (wind: WindowPtr);
- procedure SetWindClip (wind: WindowPtr);
- procedure ResetWindClip;
-
- implementation
-
- var
- oldClip: RgnHandle;
-
- { Miscellaneous routines}
- { These take care of drawing the grow box and the line along}
- { the right edge of the window, and of setting and resetting the clip}
- { region to disallow drawing in that right edge by the other drawing}
- { routines.}
-
- procedure DrawGrowBox;
-
- var
- r: Rect;
- oldClip: RgnHandle;
-
- begin
- r := wind^.portRect;
- r.left := r.right - 15; { draw only along right edge }
- oldClip := NewRgn;
- GetClip(oldClip);
- ClipRect(r);
- DrawGrowIcon(wind);
- SetClip(oldClip);
- DisposeRgn(oldClip);
- end;
-
- procedure SetWindClip;
-
- var
- r: Rect;
-
- begin
- r := wind^.portRect;
- r.right := r.right - 15; { don't draw along right edge }
- oldClip := NewRgn;
- GetClip(oldClip);
- ClipRect(r);
- end;
-
- procedure ResetWindClip;
-
- begin
- SetClip(oldClip);
- DisposeRgn(oldClip);
- end;
- end.